<#import "/macro.ftl" as m>
<@m.page_header title='后台' />
<div id="page-content-wrapper">

<div id="page-title">

    <h3>
        <#if bankManage>修改银行<#else>添加银行</#if>
    </h3>
 
</div>
<div class="pad10A">
<#if bankManage> 
<form id="demo-form1" action="/bankmanage/bankmanageupdate/${bankManage.id}" class="col-md-12" method="POST">
<#else>
<form id="demo-form1" action="/bankmanage/bankmanageadd" class="col-md-12" method="POST">
</#if>

	<#if bankManage>
	<input type="hidden" name="id" value="${bankManage.id}"/>
	</#if>
   <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                银行名称:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-8">
            <input type="text" id="bankName" name="bankName" data-trigger="change" data-required="true" class="parsley-validated" value="${bankManage.bankName}">
        </div>
    </div>
    
    <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                银行编码:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-8">
            <input type="text" id="bankCode" name="bankCode" data-trigger="change" data-required="true" class="parsley-validated" value="${bankManage.bankCode}">
        </div>
    </div>
    
    <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                web支付网关:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-5">
           	<select name="webpaygateid">
           		<option value='' selected="true">无</option>
            <#list pgList as paygate>
        		<option value="${paygate.id}" <#if bankManage.webPaygate.id == '${paygate.id}'>selected</#if>>${paygate.gateName}</option>
        	</#list>
        	</select>
        </div>
    </div>
    
    <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                h5支付网关:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-5">
            <select name="h5paygateid">
            	<option value='' selected="true">无</option>
            <#list pgList as paygate>
        		<option value="${paygate.id}" <#if bankManage.h5Paygate.id == '${paygate.id}'>selected</#if>>${paygate.gateName}</option>
        	</#list>
        	</select>
        </div>
    </div>
    
    <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                iOS支付网关:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-5">
            <select name="iospaygateid">
            	<option value='' selected="true">无</option>
            <#list pgList as paygate>
        		<option value="${paygate.id}" <#if bankManage.iOSPaygate.id == '${paygate.id}'>selected</#if>>${paygate.gateName}</option>
        	</#list>
        	</select>
        </div>
    </div>
    
    <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                Android支付网关:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-5">
            <select name="androidpaygateid">
            	<option value='' selected="true">无</option>
            <#list pgList as paygate>
        		<option value="${paygate.id}" <#if bankManage.androidPaygate.id == '${paygate.id}'>selected</#if>>${paygate.gateName}</option>
        	</#list>
        	</select>
        </div>
    </div>
    
    <div class="form-row">
        <div class="form-label col-md-2">
            <label for="">
                是否可绑卡:
                <span class="required">*</span>
            </label>
        </div>
        <div class="form-input col-md-8">
             <div class="form-checkbox-radio col-md-10">
                            <input type="radio" name="bindable" value="true" id="bindable"  <#if bankManage.bindable == true >checked="" </#if>/>
                            <label for="">是</label>

                            <input type="radio" name="bindable" value="false" id="bindable" <#if bankManage.bindable == false >checked="" </#if>/>
                            <label for="">否</label>
             </div>
        </div>
    </div>
    
    
    <div class="divider"></div>
    <div class="form-row">
        <input type="hidden" name="superhidden" id="superhidden">
       <div class="form-input col-md-10 col-md-offset-2">
                    <a href="javascript:;" class="btn medium primary-bg radius-all-4 col-md-2" id="demo-form-2-valid">提交</a>
        </div>
    </div>   

</form>
</div>
</div>


<script type="text/javascript">

$(function(){
    
	$("#demo-form-2-valid").click(function(){
		$('#demo-form1').parsley('validate');
	    $('#demo-form1').trigger('submit');
	});
});

</script>